<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>菜品管理</title>
    <script type='text/javascript' src='http://localhost/baidusale/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/baidusale/hdphp/hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<link href='http://localhost/baidusale/hdphp/hdjs/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/baidusale/hdphp/hdjs/js/hdjs.js'></script>
<script src='http://localhost/baidusale/hdphp/hdjs/js/hdvalidate.js'></script>
<script src='http://localhost/baidusale/hdphp/hdjs/js/slide.js'></script>
<script src='http://localhost/baidusale/hdphp/hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
COMMON = '<?php echo $GLOBALS['user']['COMMON'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
MODULE = '<?php echo $GLOBALS['user']['MODULE'];?>';
CONTROLLER = '<?php echo $GLOBALS['user']['CONTROLLER'];?>';
ACTION = '<?php echo $GLOBALS['user']['ACTION'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
VIEW = '<?php echo $GLOBALS['user']['VIEW'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
CONTROLLERVIEW = '<?php echo $GLOBALS['user']['CONTROLLERVIEW'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
</script>
    <link href='http://localhost/baidusale/hdphp/Extend/Org/bootstrap/css/bootstrap.min.css' rel='stylesheet' media='screen'>
<script src='http://localhost/baidusale/hdphp/Extend/Org/bootstrap/js/bootstrap.min.js'></script>
                <!--[if lte IE 6]>
                <link rel="stylesheet" type="text/css" href="http://localhost/baidusale/hdphp/Extend/Org/bootstrap/ie6/css/bootstrap-ie6.css">
                <![endif]-->
                <!--[if lt IE 9]>
                <script src="http://localhost/baidusale/hdphp/Extend/Org/bootstrap/js/html5shiv.min.js"></script>
                <script src="http://localhost/baidusale/hdphp/Extend/Org/bootstrap/js/respond.min.js"></script>
                <![endif]-->
</head>

<body>
<div class="wrap">
    <table class="table2">
        <thead>
        <tr>
            <td>菜品id</td>
            <td>菜品名称</td>
            <td>现价</td>
            <td>原价</td>
            <td>推荐</td>
            <td>已售数量</td>
            <td>菜品图片</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
            <?php if(is_array($data)){?><?php  foreach($data as $key=>$v){ ?>
                <tr>
                    <td><?php echo $v['gid'];?></td>
                    <td><?php echo $v['gname'];?></td>
                    <td><?php echo $v['new_price'];?></td>
                    <td><?php echo $v['old_price'];?></td>
                    <td><?php echo $v['tuijian'];?></td>
                    <td><?php echo $v['saled'];?></td>   
                    <td><img style="width:50px;height:50px;" src="http://localhost/baidusale/<?php echo $v['goods_picture'];?>" alt="" /></td>
                    <td width="200">
                        <a href="<?php echo U('Store/goods_edit',array('gid'=>$v['gid']));?>" class="btn btn-success btn-xs">编辑</a>
                        <a href="javascript:;" class="btn btn-danger btn-xs"onclick="if(confirm('确定删除吗？')) location.href='<?php echo U('Store/goods_dele',array('gid'=>$v['gid']));?>'">删除</a>
                    </td>
                </tr>    
            <?php }}?>
            <div class="position-bottom">
                <a href="<?php echo U('Store/goods_add',array('tid'=>$tid));?>" class="hd-success">添加菜品</a>
            </div>            
        </tbody>
    </table>

</div>

</body>
</html>


